home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 100 / 100.d81 / invaders 100 (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1992-01-01  |  2.8 KB  |  100 lines

  1. 4 gosub700
  2. 5 poke53280,14:poke53281,14:printchr$(142)""
  3. 10 print"[149][147][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
  4. 20 print"   [144]      ** alien invaders **       "
  5. 21 print"     j - left  k - fire  l - right  "
  6. 22 print"               q - quit             "
  7. 23 forx=1to2000:geta$:ifa$<>""thenx=2000
  8. 24 next:x=0
  9. 34 print"                                       "
  10. 35 print"                        [144]hits: 0        "
  11. 100 print"[164][175][162][184][163][163][184][184][183][163][163][184][146][162][185][175][164][164]"
  12. 104 print""
  13. 105 ta$="[144]   [194] [157][157][157][157][157] [164]  [146][164] [157][157][157][157][157][157][157] [167][215][215][215][215][165] "
  14. 110 al$=" <-> ":ex$="[145][205][194][206][157][157][157][195] [195][157][157][157][206][194][205]"
  15. 115 hi$=""
  16. 120 y=20:bo$="   [157][157][209]"
  17. 125 sh$=" [177][157] "
  18. 200 print""tab(34)"[149][169]   [223][145][157][157][157][157]   [145][157][157][157]  [223][145][157][157][157]  [146]";
  19. 201 print"[157][157][157][157][145][223]    [146][169][145][157][157][157][157][157][157]      [145][157][157][157][157][157][157][169]    [223]"
  20. 203 bm=22:gosub516:print""tab(x)hh$"     "
  21. 204 z=int(rnd(1)*12+4):ifz=3then204
  22. 205 di=int(rnd(1)*2+1)
  23. 206 hh$=left$(hi$,z)
  24. 210 ifdi=1then forx=1to35step.5:goto220
  25. 215 forx=35to1step-.5
  26. 220 print""tab(x)hh$;al$
  27. 225 print""tab(y)""ta$
  28. 230 geta$:ifa$=""thena$=b$
  29. 231 ifb$<>"j"andb$<>"k"andb$<>"l"andb$<>"q"thenpokem-3,32:pokem-10,32:pokem+10,.
  30. 232 ifa$="q"then800
  31. 233 ifa$="k"thena$=b$:z$="k":goto240
  32. 235 b$=a$
  33. 240 ifa$="j"theny=y-1:pokem+10,15:pokem-3,33:pokem-10,33
  34. 241 ifa$="l"theny=y+1:pokem+10,15:pokem-3,33:pokem-10,33
  35. 243 ifz$="k"thenz$="^":gosub 300:rem shoot
  36. 244 ify<2theny=2
  37. 245 ify>27theny=27
  38. 246 ifsh=1thengosub300
  39. 247 iftw=1thentw=0:goto200
  40. 248 gosub500
  41. 250 next
  42. 260 goto200
  43. 300 rem shoot
  44. 301 if sh=1then304
  45. 302 sh=1:v=y:v=v+2
  46. 303 w=21
  47. 304 w=w-1:ifw=3thenprint""tab(v)hg$"  ":w=1:goto315
  48. 305 hg$=left$(hi$,w)
  49. 310 print""tab(v)hg$;sh$
  50. 315 ifw=1thensh=0:print"                                       "
  51. 316 ifhg$=hh$thengosub400:rem hitmaybe
  52. 320 return
  53. 400 rem hm
  54. 404 x=int(x+.5):v=int(v+.5)
  55. 405 ifv<x+2.5andv>x-1.5then410
  56. 406 return:tw=0
  57. 410 print""tab(x)hh$;ex$:fortm=1to100:next
  58. 411 print""tab(x)hh$;"[157][145]    [157][157][157][157]    [157][157][157][157]    ":sh=0:ts=ts+1
  59. 412 print"[144]"tab(24)"hits:"ts
  60. 415 tw=1:bm=22:gosub516:pokem+4,17:pokem+10,15:pokem+4,16:return
  61. 500 rem ashot
  62. 502 ifbs=1then510
  63. 504 xx=int(rnd(1)*10+2)
  64. 506 ifxx=5then508
  65. 507 return
  66. 508 bs=1:bm=z
  67. 510 bm=bm+1:bm$=left$(hi$,bm)
  68. 512 print""tab(x)bm$;bo$
  69. 514 gosub600:rem hit tankmb
  70. 516 if bm=22thenbs=0:print""tab(x)bm$;"   "
  71. 520 return
  72. 600 rem hitttank mb
  73. 605 ifbm>20and(x=yorx=y+1orx=y+2orx=y+3orx=y+4) then610
  74. 608 return
  75. 610 geta$:ifa$<>""then610
  76. 611 print""tab(y+1)"[169][169][169][169]"
  77. 612 forx=1to100:next
  78. 613 print""tab(y+1)"[223][223][223][223]"
  79. 614 forx=1to100:next
  80. 615 print"[144]  you have been hit!"
  81. 616 print"     your final score is"ts
  82. 618 print"         press space to play again."
  83. 619 print"             press q to quit."
  84. 620 geta$:ifa$<>" "anda$<>"q"then611
  85. 622 ifa$="q"then800
  86. 630 run
  87. 700 forj=54272to54296:pokej,.:next
  88. 710 m=54272:pokem+1,1:pokem+3,8:pokem+5,0:pokem+6,90:pokem+4,33
  89. 720 m=54279:pokem+1,2:pokem+3,8:pokem+5,0:pokem+6,90:pokem+4,33
  90. 730 m=54286:pokem+1,25:pokem+3,8:pokem+5,12:pokem+6,90:pokem+4,16
  91. 750 return
  92. 800 poke54296,0:poke53281,0:poke53280,0
  93. 805 fori=8to9:open15,i,15,"r0:hello connect=hello connect":input#15,er:close15
  94. 810 ifer=63thendv=i:i=9:next:goto830
  95. 820 next:print"[147]":end
  96. 830 poke646,peek(53281):print"[147]load"chr$(34)"hello connect"chr$(34)","dv
  97. 840 print"run"
  98. 850 poke631,13:poke632,13:poke198,2:end
  99. 10000 open15,8,15,"s0:invaders 100":close15:save"invaders 100",8:end
  100.